import request from '@/utils/request'
// // 权限服务 18101
const storageServer = process.env.VUE_APP_API_BASIC_AUTHORITY_WEB_SERVICE_URL
const Server = process.env.VUE_APP_API_PERSON_SERVICE_URL
const recruitServer = process.env.VUE_APP_API_RECRUIT_SERVICE_URL
// 用户登录获取token
export function loginInCrec (params) {
  return request({
    url: `${storageServer}/user/token`,
    method: 'get',
    params
  })
}
// 获取用户信息
export function getUserInfo (params) {
  return request({
    url: `${storageServer}/user/info`,
    method: 'get',
    params
  })
}
// 上传-员工个人信息-其他附件情况
export function uploadPersonFile (data) {
  return request({
    url: `${Server}/emp/file/store/uploadFile`,
    method: 'post',
    data
  })
}
// 删除文件
export function deleteFile (params) {
  return request({
    url: `${Server}/emp/file/store/delFile`,
    method: 'get',
    params
  })
}
// 删除上传文件
export function deletePersonFile (params) {
  return request({
    url: `${Server}/emp/file/store/delFile`,
    method: 'get',
    params
  })
}
// 员工管理->信息维护->文件信息->下载附件
export function downPersonFile (params) {
  return request({
    url: `${Server}/emp/file/store/downFile`,
    method: 'get',
    responseType: 'blob',
    params
  })
}
// 应聘人员简历录入->获取字典
export function getDict (params) {
  return request({
    url: `${recruitServer}/hr-recru-resume-enter-web/getDict`,
    method: 'get',
    params
  })
}
// 应聘人员简历录入->获取意向单位字典
export function queryUnitInfoByUnitId (params) {
  return request({
    url: `${recruitServer}/hr-recru-resume-enter-web/queryUnitInfoByUnitId`,
    method: 'get',
    params
  })
}
// 应聘人员简历录入->获取生源地字典
export function queryOriginPlaceByCode (params) {
  return request({
    url: `${recruitServer}/hr-recru-resume-enter-web/queryOriginPlaceByCode`,
    method: 'get',
    params
  })
}
// 上传-附件
export function uploadFile (data) {
  return request({
    url: `${recruitServer}/hr-pub-emp-attach-web/uploadModule`,
    method: 'post',
    data
  })
}
// 下载附件
export function downFile (params) {
  return request({
    url: `${recruitServer}/hr-pub-emp-attach-web/downLoadFile`,
    method: 'get',
    responseType: 'blob',
    params
  })
}
// 头部信息 删除头像
export function delFile (data) {
  return request({
    url: `${recruitServer}/hr-pub-emp-attach-web/del/attach/and/file`,
    method: 'post',
    data
  })
}
//  - 获取登录人
export function queryLoginUerInfo (params) {
  return request({
    url: `${recruitServer}/commom-web/queryLoginUserDetailInfo`,
    method: 'get',
    params
  })
}
//  - 简历录入
export function addEnterUerInfo (data) {
  return request({
    url: `${recruitServer}/hr-recru-resume-enter-web/add`,
    method: 'post',
    data
  })
}
//  - 简历录入---简历录入检查
export function addInfoCheck (params) {
  return request({
    url: `${recruitServer}/hr-recru-resume-enter-web/add/check`,
    method: 'get',
    params
  })
}
